<%@page import="com.situ.personal.entity.Department"%>
<%@page import="com.situ.personal.entity.User"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%
	// List<Department> departmentList = (List<Department>)request.getAttribute("Department");
	User user = (User)request.getAttribute("user");
	%>
	<form action="<%=request.getContextPath()%>/user?method=updateById" method="post">
		<input type="hidden" name="id" value="<%=user.getId()%>">
		用户名：<input type="text" name="name" value="<%=user.getName()%>"/><br>
		年龄：<input type="text" name="age" value="<%=user.getAge() %>"/><br>
		密码：<input type="text" name="password" value="<%=user.getPassword()%>"/><br>
		邮箱：<input type="text" name="email" value="<%=user.getEmail()%>"/><br>
		部门：<input type="text" name="departmentId" value="<%=user.getDepartmentId()%>"/><br>
<%-- 	部门：<select name="departmentId" >
		<%
		for(Department department : departmentList){
		%>
		<option value="<%= department.getId()%>"> <%= department.getName()%> </option>
		<%
		}
		%>
		</select><br>  --%>
	
		<input type="submit" value="修改"/>
	</form>
	
</body>
</html>